/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ssi.mrms.model;

import java.io.Serializable;
import java.util.Collection;
import java.util.Date;

/**
 *
 * @author jirapatjantsakool
 */
public class RMcphdrModel extends BaseModel implements Serializable {

    private static final long serialVersionUID = 1L;
    private int cphid;
    private String cphdocno;
    private String cphdocstat;
    private String cphreqby;
    private Date cphreqdat;
    private String cphreqtel;
    private String cphreqemail;
    private String cphrcvby;
    private Date cphrcvdat;
    private String cphcreby;
    private Date cphcredat;
    private String cphupdby;
    private Date cphupddat;
    private int rlrmid;
    private Collection<RMcpdtlModel> rmcpdtlCollection;
    
    private RMcpdtlModel complaintDetail;
    private TowerModel tower;

    public RMcphdrModel() {
    }

    public int getCphid() {
        return cphid;
    }

    public void setCphid(int cphid) {
        this.cphid = cphid;
    }

    public String getCphdocno() {
        return cphdocno;
    }

    public void setCphdocno(String cphdocno) {
        this.cphdocno = cphdocno;
    }

    public String getCphdocstat() {
        return cphdocstat;
    }

    public void setCphdocstat(String cphdocstat) {
        this.cphdocstat = cphdocstat;
    }

    public String getCphreqby() {
        return cphreqby;
    }

    public void setCphreqby(String cphreqby) {
        this.cphreqby = cphreqby;
    }

    public Date getCphreqdat() {
        return cphreqdat;
    }

    public void setCphreqdat(Date cphreqdat) {
        this.cphreqdat = cphreqdat;
    }

    public String getCphreqtel() {
        return cphreqtel;
    }

    public void setCphreqtel(String cphreqtel) {
        this.cphreqtel = cphreqtel;
    }

    public String getCphreqemail() {
        return cphreqemail;
    }

    public void setCphreqemail(String cphreqemail) {
        this.cphreqemail = cphreqemail;
    }

    public String getCphrcvby() {
        return cphrcvby;
    }

    public void setCphrcvby(String cphrcvby) {
        this.cphrcvby = cphrcvby;
    }

    public Date getCphrcvdat() {
        return cphrcvdat;
    }

    public void setCphrcvdat(Date cphrcvdat) {
        this.cphrcvdat = cphrcvdat;
    }

    public String getCphcreby() {
        return cphcreby;
    }

    public void setCphcreby(String cphcreby) {
        this.cphcreby = cphcreby;
    }

    public Date getCphcredat() {
        return cphcredat;
    }

    public void setCphcredat(Date cphcredat) {
        this.cphcredat = cphcredat;
    }

    public String getCphupdby() {
        return cphupdby;
    }

    public void setCphupdby(String cphupdby) {
        this.cphupdby = cphupdby;
    }

    public Date getCphupddat() {
        return cphupddat;
    }

    public void setCphupddat(Date cphupddat) {
        this.cphupddat = cphupddat;
    }

    public int getRlrmid() {
        return rlrmid;
    }

    public void setRlrmid(int rlrmid) {
        this.rlrmid = rlrmid;
    }

    public Collection<RMcpdtlModel> getRmcpdtlCollection() {
        return rmcpdtlCollection;
    }

    public void setRmcpdtlCollection(Collection<RMcpdtlModel> rmcpdtlCollection) {
        this.rmcpdtlCollection = rmcpdtlCollection;
    }

    public RMcpdtlModel getComplaintDetail() {
        return complaintDetail;
    }

    public void setComplaintDetail(RMcpdtlModel complaintDetail) {
        this.complaintDetail = complaintDetail;
    }

    public TowerModel getTower() {
        return tower;
    }

    public void setTower(TowerModel tower) {
        this.tower = tower;
    }
    
    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) cphid;
        hash += (cphdocno != null ? cphdocno.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof RMcphdrModel)) {
            return false;
        }
        RMcphdrModel other = (RMcphdrModel) object;
        if (this.cphid != other.cphid) {
            return false;
        }
        if ((this.cphdocno == null && other.cphdocno != null) || (this.cphdocno != null && !this.cphdocno.equals(other.cphdocno))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.ssi.mrms.model.RMcphdrModel[ cphid=" + cphid + ", cphdocno=" + cphdocno + " ]";
    }

}
